package com.lh;

import com.alibaba.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

@Configuration
@EnableDubbo(scanBasePackages = "com.lh.service.impl")//扫描添加了@Service的注解
@PropertySource("classpath:dubbo-provider.properties")//配置文件的扫描
public class Provider2 {
    public static void main(String[] args) throws Exception {
//        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[]{"provider.xml"});
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(Provider2.class);
        context.start();
        System.in.read(); // 按任意键退出
    }

}
